<template>
  <el-dialog
    :title="title"
    :visible="visible"
    @close="handleClose"
  >
    <slot />
  </el-dialog>
</template>

<script>
export default {
  props: {
    title: {
      type: String,
      default: ''
    },
    visible: {
      type: Boolean,
      default: false
    }
  },
  methods: {
    handleClose() {
      this.$emit('close')
    }
  }
}
</script>

<style lang="scss" scoped>
::v-deep .el-dialog__body{
  min-width: 50vw;
  max-height: 70vh;
  overflow-y: auto;
}
::v-deep .el-dialog__header{
  padding: 35px 20px 10px;
}
::v-deep .el-dialog__header{
  font-weight: bold;
}
</style>
